package com.yiwyn.util;

import java.util.HashMap;
import java.util.Map;

public class MapUtil {

    public static <K, V> Map<K, V> joinArray(K[] ks, V[] vs) {
        int length = Math.min(ks.length, vs.length);
        Map<K, V> result = new HashMap<>();
        for (int i = 0; i < length; i++) {
            result.put(ks[i], vs[i]);
        }
        return result;
    }

}
